<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/tagDeclare.jsp"%>
<%@include file="/headDeclare.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<script type="text/javascript">
	  $(document).ready(function(){
			//文件上传组件
		     $("#file_upload").uploadify({   
               'height'        : 27,    
 	          'width'         : 80,     
 	          'buttonText'    : '添加照片',   
 	          'queueID': 'fileQueue', 
 	          'removeCompleted': false,         //上传完毕上传列表是否去除 
 	          'fileSizeLimit': '20MB',          //上传文件大小设置 单位可以是B、KB、MB、GB 
               'swf'           : 'js/uploadify/uploadify.swf',   
 	          'uploader'      : '<%=basePath%>batchUpload.do?model=team',   
 	          'auto'          : false,   
 	          'fileTypeExts'  : '*.jpg;*.png;*.gif',   
 	          'multi'			: true,
 	          'onUploadStart' : function(file) {   
 	                $("#file_upload").uploadify("settings");   
 	           },   
 	          'onUploadSuccess':function(file, data, response){ 
 	        	 var json=eval("("+data+")"); //转换为json对象
	        	  $('#' + file.id).find('.data').html(json.msg);
 	           }
		      });
	   });
	  
	  function startUpload(){
		  $('#file_upload').uploadify('upload','*');   
	   }  
	</script>
</head>

<body>
	<div >
		<form action="" method="post" >
			<table>
				<tr>
					<td>首页图片：</td>
					<td><input type="file" name="uploadify" id="file_upload" /></td>
					<td><label id="fileQueue" ></label></td>
				</tr>
				<tr>
					<td>预览</td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>
